<?php
$configFunction = $this->getConfigFunction()? $this->getConfigFunction(): 'null';
$callbackFunction = $this->getCallbackFunction()? $this->getCallbackFunction(): 'null';
?>
<div class="poi-browser">
<div>
<a href="javascript:void(0)" onclick="showPoiBrowser({container:'<?php echo $this->getId()?>_container', id:'<?php echo $this->getId()?>', name:'<?php echo $this->getName()?>', 'configFunction':<?php echo $configFunction ?>, 'callbackFunction':<?php echo $callbackFunction ?>})">
    <?php echo Kd_Localize_Helper::__('share.button.browse')?>
</a>
</div>
<ul id="<?php echo $this->getId()?>_container" class="poi-selected-list">
<?php
$val = $this->getValue();
if(!empty($val)):
    foreach($this->getValue() as $poi):
?>
<li id="poi_<?php echo $poi->getId()?>">
    <span><?php echo $poi->getShopName() ?></span>
    <a class="button" onclick="javascript:deletePoiSelected(this)" href="javascript:void(0)"><?php echo Kd_Localize_Helper::__('share.button.delete') ?></a>
    <input type="hidden" value="<?php echo $poi->getId()?>" name="<?php echo $this->getName()?>">
</li>
<?php 
    endforeach;
endif;
?>
</ul>
<input type="text" id="<?php echo $this->getId()?>" style="display:none" <?php echo $this->getValidateRuleHtml() ?>/>
<div class="clear"></div>
</div>